#ifndef BACKGROUND_HPP_
#define BACKGROUND_HPP_

/*******************************************************************************
 ** Name:  background.hpp                                                     **
 ** Description:                         **
 **                                                                           **
 ** Open Source Initiative (OSI) Approved License                             **
 **                                                                           **
 ** The contents of this file are subject to the terms of the                 **
 ** Common Development and Distribution License, Version 1.0 only             **
 ** (the "License").  You may not use this file except in compliance          **
 ** with the License.                                                         **
 **                                                                           **
 ** You can find a copy of the license in the LICENSE file within             **
 ** this distribution or at $WIKI/display/ODS/License-software.              **
 ** Software distributed under the License is distributed on an "AS IS"       **
 ** basis, WITHOUT WARRANTY OF ANY KIND, either express or implied.           **
 ** See the License for the specific language governing permissions           **
 ** and limitations under the License.                                        **
 **                                                                           **
 ** When distributing Covered Code, include this CDDL header in each          **
 ** file and include the License file at $GAME_DIR/LICENSE.                   **
 ** If applicable, add the following below this header, with the indicated    **
 ** fields enclosed by brackets "[]" replaced with your own identifying       **
 ** information: Portions Copyright [yyyy] [name of copyright owner]          **
 **                                                                           **
 ** Copyright (c) 2009-2012 Open Design Strategies, LLC                       **
 ** All rights reserved.                                                      **
 ******************************************************************************/
// $HeadURL$
// Modified $Date$ by $Author$
// $Id$// Created on April 4, 2010, 10:03 AM
// Modified $Date$ by $Author$
#define background_hpp_ID   "$Id$"
// support for GOVT-15

#include <odb/core.hxx>

enum class BackgroundRequirement { None, Feat, Skill, Stat, Flaw };

//! @class Background
//! @brief Supports character background levels
//! Backgrounds give a bonus to one stat and a penalty to another.
#pragma db object
class Background
{
public:
	Background();

	// Getters
	const std::string &	Name() const { return name; }
	const std::string &	Desc() const { return desc; }
	const ushort 		HD() const { return hd; }
	const entity_t 		Requirement() const { return requirement; }
	const BackgroundRequirement  RequirementType() const { return requirementType; }

	// Setters
	void	Name(const std::string & n) { name = n; }
	void	Desc(const std::string & d) { desc = d; }
	void	HD(const ushort h) { hd = h; }
	void	Requirement(const entity_t e) { requirement = e; }
	void	RequirementType(const BackgroundRequirement b) { requirementType = b; }

private:
	friend class odb::access;

	#pragma db id
	std::string	name;
	std::string	desc;
	ushort		hd;


	entity_t	requirement;
	#pragma db column("requirement_type")
	BackgroundRequirement requirementType;
};



#endif /* BACKGROUND_HPP_ */
